include "Errors.thrift"
namespace java com.emagsoftware.partake.global
struct UserFavorite {
      1: optional i64 id
      2: required i64 userId,
      3: required string targetObject,
      4: optional string userTel,
      5: optional string clientVersion,
      6: optional string userAgent,
      7: optional string userChannel,
      8: optional string clientPlatform,
      9:  optional i64 favoriteTime,
      10: required i32 favoriteOrigin,
      11: optional string userIp,
      12: required i32 targetType,
      13: optional string favoriteDesc
}
struct UserFavoritePageResult {
      1: required  list<UserFavorite> favoriteList,
      2: required  i32  total
}
service UserFavoriteClient{
         void  saveUserFavorite(UserFavorite userFavorite)throws (1: Errors.ServiceRuntimeException serviceRuntimeException),
         UserFavoritePageResult  queryUserFavorites (
                             1:required i64  userId
                             2:required list<string> favoriteOrigins
                             3:required list<string>  favoriteTypes
                             4:required i32  offset
                             5:required i32  max
         )throws (1: Errors.ServiceRuntimeException serviceRuntimeException)
}